﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LookupAddress.ascx.cs"
    Inherits="ServicesDirectory.UserControl.LookupAddress" %>

<script type="text/javascript">

function SetUniqueRadioButton( current)
{

        for(var i = 0; i < document.forms[0].elements.length; i++) {
        	var elm = document.forms[0].elements[i];
        	if (elm.type == 'radio')
        {
        
        elm.checked = false;
        
        }
        }
	
	current.checked = true;
}
</script>

<div class="bgPopup">
    <div class="TitleManarer">
        Search Address
    </div>
    <div class="spaceManager">
    </div>
    <div class="listContact">
        <div class="spaceManager">
        </div>
        <div class="AddresstitleCol1">
            PostCode:</div>
        <div class="AddresstitleCol2">
            <asp:TextBox runat="server" ID="txtPostCode" Width="99%"></asp:TextBox></div>
        <div class="AddresstitleCol1">
            Street:</div>
        <div class="AddresstitleCol2">
            <asp:TextBox runat="server" ID="txtStreet" Width="99%"></asp:TextBox>
        </div>
        <div class="AddresstitleCol1">
            Town:</div>
        <div class="AddresstitleCol2">
            <asp:TextBox runat="server" ID="txtTown" Width="99%"></asp:TextBox>
        </div>
    </div>
    <div class="spaceManager">
    </div>
    <div class="ButonContact">
        <asp:Button runat="server" ID="btnSearch" Text="Search" Font-Size="XX-Small" Height="21px" />
        <asp:Button runat="server" Width="60px" ID="btnNone" Text="None" Font-Size="XX-Small" />
        <asp:Button runat="server" Width="60px" ID="btnClear" Text="Clear" Font-Size="XX-Small" />
    </div>
    <div class="spaceManager">
    </div>
    <div class="contentGrid">
        <div class="hearderGrid">
            <div class="AddressTypeHeaderCol0">
                &nbsp;
            </div>
            <div class="AddressTypeHeaderCol1">
                Addresss</div>
            <div class="AddressTypeHeaderCol2">
                PostCode</div>
            <div class="AddressTypeHeaderCol3">
                Town</div>
            <div class="AddressTypeHeaderCol4">
                County</div>
            <div class="AddressTypeHeaderCol5">
                Country</div>
        </div>
        <asp:Repeater runat="server" ID="rptAddress">
            <ItemTemplate>
                <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("AddressId") %>' />
                <div class="rowGrid">
                    <div class="AddressTypeContentCol0">
                        <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                    <div class="AddressTypeContentCol1">
                        <%#Eval("Street") %>
                    </div>
                    <div class="AddressTypeContentCol2">
                        <%#Eval("PostCode") %></div>
                    <div class="AddressTypeContentCol3">
                        <asp:Label runat="server" ID="lblTownName" Text='<%#Eval("TownId") %>'></asp:Label>
                    </div>
                    <div class="AddressTypeContentCol4">
                        <asp:Label runat="server" ID="lblCountyName" Text='<%#Eval("CountyId") %>'></asp:Label></div>
                    <div class="AddressTypeContentCol5">
                        <asp:Label runat="server" ID="lblCountryName" Text='<%#Eval("CountryId") %>'></asp:Label>
                    </div>
                </div>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("AddressId") %>' />
                <div class="alterRowGrid">
                    <div class="AddressTypeContentCol0">
                        <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                    <div class="AddressTypeContentCol1">
                        <%#Eval("Street") %>
                    </div>
                    <div class="AddressTypeContentCol2">
                        <%#Eval("PostCode") %></div>
                    <div class="AddressTypeContentCol3">
                        <asp:Label runat="server" ID="lblTownName" Text='<%#Eval("TownId") %>'></asp:Label>
                    </div>
                    <div class="AddressTypeContentCol4">
                        <asp:Label runat="server" ID="lblCountyName" Text='<%#Eval("CountyId") %>'></asp:Label></div>
                    <div class="AddressTypeContentCol5">
                        <asp:Label runat="server" ID="lblCountryName" Text='<%#Eval("CountryId") %>'></asp:Label>
                    </div>
                </div>
            </AlternatingItemTemplate>
        </asp:Repeater>
        <asp:HiddenField runat="server" ID="currentContactId" />
    </div>
    <div class="PagingList">
        <span>
            <asp:Button runat="server" CssClass="backAllList" ID="btnBackAll" />
        </span><span>
            <asp:Button runat="server" CssClass="backList" ID="btnBacklist" /></span> <span style="padding-left: 5px;">
                Page</span> <span style="padding-left: 5px;">
                    <asp:TextBox Text="1" runat="server" Width="20px" ID="tbPageNumber"></asp:TextBox></span>
        <span>of</span> <span>
            <asp:Label runat="server" Text="1" ID="lblTotalPage"></asp:Label></span> <span>
                <asp:Button runat="server" CssClass="nextAll" ID="btnNextAll" />
            </span><span>
                <asp:Button runat="server" CssClass="nextList" ID="btnNext" />
            </span>
    </div>
    <div class="spaceManager">
    </div>
    <div class="ButonContact">
        <asp:Button runat="server" Width="60px" ID="btnSelect" Text="Select" Font-Size="XX-Small" />
        <asp:Button runat="server" Width="60px" ID="btnClose" Text="Close" Font-Size="XX-Small" />
        &nbsp;
        <asp:Label runat="server" ID="lblMessage"></asp:Label>
    </div>
    <div class="spaceManager">
    </div>
</div>
